.game-container {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
}

#chess_area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#chess {
    border: 8px solid #8b4513;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    background-image: url('../image/wood-texture.jpg');
    background-size: cover;
    transition: var(--transition);
}

#chess:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

#screen {
    width: 450px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 60px;
    text-align: center;
    color: var(--accent);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

#chat_area {
    width: 350px;
    height: 510px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow);
}

#chat_show {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#chat_show::-webkit-scrollbar {
    width: 6px;
}

#chat_show::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#msg_show {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
}

#chat_input {
    flex: 1;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--neutral);
    font-size: 1rem;
}

#chat_input:focus {
    outline: none;
    border-color: var(--accent);
}

#chat_button {
    padding: 0 1.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

#chat_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* 聊天消息样式 */
#self_msg, #peer_msg {
    max-width: 80%;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 0.95rem;
}

#self_msg {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

#peer_msg {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--neutral);
    border-bottom-left-radius: 4px;
}

/* 游戏结束按钮 */
#back-button {
    margin-top: 1rem;
    padding: 0.7rem 1.5rem;
    align-self: center;
}